package com.ruoyi.stock.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock.mapper.MStockMapper;
import com.ruoyi.stock.domain.MStock;
import com.ruoyi.stock.service.IMStockService;

/**
 * 库存管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-25
 */
@Service
public class MStockServiceImpl implements IMStockService 
{
    @Autowired
    private MStockMapper mStockMapper;


    /**
     * 查询库存管理
     * 
     * @param stockId 库存管理主键
     * @return 库存管理
     */
    @Override
    public MStock selectMStockByStockId(Long stockId)
    {
        return mStockMapper.selectMStockByStockId(stockId);
    }

    /**
     * 查询库存管理列表
     * 
     * @param mStock 库存管理
     * @return 库存管理
     */
    @Override
    public List<MStock> selectMStockList(MStock mStock)
    {
        return mStockMapper.selectMStockList(mStock);
    }

    /**
     * 新增库存管理
     * 
     * @param mStock 库存管理
     * @return 结果
     */
    @Override
    public int insertMStock(MStock mStock)
    {
        return mStockMapper.insertMStock(mStock);
    }

    /**
     * 修改库存管理
     * 
     * @param mStock 库存管理
     * @return 结果
     */
    @Override
    public int updateMStock(MStock mStock)
    {
        return mStockMapper.updateMStock(mStock);
    }

    /**
     * 批量删除库存管理
     * 
     * @param stockIds 需要删除的库存管理主键
     * @return 结果
     */
    @Override
    public int deleteMStockByStockIds(Long[] stockIds)
    {

        return mStockMapper.deleteMStockByStockIds(stockIds);
    }

    /**
     * 删除库存管理信息
     * 
     * @param stockId 库存管理主键
     * @return 结果
     */
    @Override
    public int deleteMStockByStockId(Long stockId)
    {
        return mStockMapper.deleteMStockByStockId(stockId);
    }
}
